﻿using Domain.Entity;
using Domain.Repository;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Application.AppService.RolesJurisdictionAppService
{
    public class RolesJurisdictionAppService : IRolesJurisdictionAppService
    {
        private readonly IRolesJurisdictionRepository rolesJurisdictionRepository;

        public RolesJurisdictionAppService(IRolesJurisdictionRepository rolesJurisdictionRepository)
        {
            this.rolesJurisdictionRepository = rolesJurisdictionRepository;
        }
        public Task<bool> AddRolesJurisdictionAsync(int rid, int jid)
        {
            return rolesJurisdictionRepository.AddRolesJurisdictionAsync( rid,jid);
        }

        public Task<bool> DeleteRolesJurisdictionAsync(int rid)
        {
            return rolesJurisdictionRepository.DeleteRolesJurisdictionAsync(rid);
        }

        public List<RolesJurisdiction> GetRolesJurisdiction(int rid)
        {
            return rolesJurisdictionRepository.GetRolesJurisdiction(rid);
        }
    }
}
